[Flight] Add Web Stream support to the Flight Server in Node#33474
Merged
sebmarkbage merged 8 commits intofacebook:mainfrom Jun 7, 2025
Merged
[Flight] Add Web Stream support to the Flight Server in Node#33474sebmarkbage merged 8 commits intofacebook:mainfrom
sebmarkbage merged 8 commits intofacebook:mainfrom
Conversation
da96321 to
68b7bdb
Compare
68b7bdb to
3732f37
Compare
unstubbable
approved these changes
Jun 7, 2025
packages/react-server-dom-webpack/src/server/ReactFlightDOMServerNode.js
Outdated
Show resolved
Hide resolved
| return stream; | ||
| } | ||
|
|
||
| function createFakeWritableFromNodeReadable(readable: any): Writable { |
Collaborator
There was a problem hiding this comment.
Suggested change
| function createFakeWritableFromNodeReadable(readable: any): Writable { | |
| function createFakeWritableFromNodeReadable(readable: Readable): Writable { |
packages/react-server-dom-turbopack/src/server/ReactFlightDOMServerNode.js
Outdated
Show resolved
Hide resolved
| return stream; | ||
| } | ||
|
|
||
| function createFakeWritableFromNodeReadable(readable: any): Writable { |
Collaborator
There was a problem hiding this comment.
Suggested change
| function createFakeWritableFromNodeReadable(readable: any): Writable { | |
| function createFakeWritableFromNodeReadable(readable: Readable): Writable { |
| chunk = textEncoder.encode(chunk); | ||
| } | ||
| controller.enqueue(chunk); | ||
| // in web streams there is no backpressure so we can alwas write more |
Collaborator
There was a problem hiding this comment.
Suggested change
| // in web streams there is no backpressure so we can alwas write more | |
| // in web streams there is no backpressure so we can always write more |
| return stream; | ||
| } | ||
|
|
||
| function createFakeWritableFromNodeReadable(readable: any): Writable { |
Collaborator
There was a problem hiding this comment.
Suggested change
| function createFakeWritableFromNodeReadable(readable: any): Writable { | |
| function createFakeWritableFromNodeReadable(readable: Readable): Writable { |
packages/react-server-dom-parcel/src/server/ReactFlightDOMServerNode.js
Outdated
Show resolved
Hide resolved
packages/react-server-dom-parcel/src/server/ReactFlightDOMServerNode.js
Outdated
Show resolved
Hide resolved
unstubbable
added a commit
to unstubbable/react
that referenced
this pull request
Jun 7, 2025
This was missed in facebook#33474. We're adding the new exports to the server entries only. The client entries don't need to be changed because they use `export *`.
unstubbable
added a commit
to unstubbable/react
that referenced
this pull request
Jun 7, 2025
This was missed in facebook#33474.
This was referenced Jun 9, 2025
17 tasks
21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This needs some tweaks to the implementation and a conversion but simple enough.